package jt.classic.system.workflow;

import org.limp.mine.StringTool;
import org.limp.mine.XMLTool;

import java.io.File;
import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


/**
 * 流转图形显示
 * @author iBizkit
 *
 */
public class DrawingServlet extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
        // TODO Auto-generated method stub
        //response.sendRedirect("test.jsp");
        doPost(request, response);
    }

    /* (non-Java-doc)
     * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
     */
    public void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
        String id = StringTool.checkString(request.getParameter("flow"));

        if (!id.equals("")) {
            String url = jt.classic.system.ISystem.getContextPath() +
                "/demo/viewprocess.html?name=" + id;
            response.sendRedirect(url);
        }
    }
}
